const Router = require('@koa/router');
const { generateCaptcha } = require('../../controllers/captchaController');

const router = new Router({
    prefix: '/api'
});

/**
 * @swagger
 * /api/captcha:
 *   get:
 *     summary: 获取验证码
 *     tags: [Captcha]
 *     responses:
 *       200:
 *         description: 成功获取验证码
 *         content:
 *           image/svg+xml:
 *             schema:
 *               type: string
 *               format: binary
 *               description: SVG格式的验证码图片
 */
router.get('/captcha', generateCaptcha);

module.exports = router; 